<script>
export default {
  data() {
    return {
      menu: []
    }
  },
  props: {
    isCollapse: Boolean
  },
  created() {

    const storedMenu = sessionStorage.getItem("menu");
    this.menu = JSON.parse(storedMenu);

  },
  methods: {

  }
}
</script>

<template>
  <el-menu style="height: 100vh; background-color: #7c7777; text-color: rgba(169, 169, 169, 0.3); active-text-color: #ffdd7b;"
           :collapse="isCollapse"
           :collapse-transition="false"
           router
  >
    <el-menu-item index="/MainPage">
      <i class="el-icon-s-home"></i>
      <span slot="title">首页</span>
    </el-menu-item>
    <el-menu-item :index="'/'+item.menuClick" v-for="(item, i) in menu" :key="i">
      <i :class="item.menuIcon"></i>
      <span slot="title">{{ item.menuName }}</span>
    </el-menu-item>
  </el-menu>
</template>

<style scoped>
</style>
